<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('诊疗单列表')"/>
</head>
<body class="gray-bg">

<div class="container-div">
    <div class="row" id="printArea">

        <div class="col-sm-12 search-collapse">
            <form id="formId">
                <div class="select-list">
                    <input hidden="hidden" name="orderId" th:value="${orderId}"/>
                   <!-- <li>
                        <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
                                class="fa fa-search"></i>&nbsp;搜索</a>
                        <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
                                class="fa fa-refresh"></i>&nbsp;重置</a>
                    </li>-->
                    </ul>
                </div>
            </form>
        </div>

        <h3 align="center"> <span th:text="牛舍诊疗" id="ordercode" hidden="hidden"></span> </h3>
        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table-mianyi-logs-status1" data-mobile-responsive="true"></table>
            <h3> <span class="fl-l" id="autograph" hidden="hidden"></span> </h3>
        </div>

        <div class="btn-group-sm" id="toolbar1" role="group">

            <a class="btn btn-warning" onclick="$.table.exportExcel()">
                <i class="fa fa-download"></i> 导出
            </a>
            <a class="btn btn-warning" id="print-btn" orderType = "14">
                <i class="fa fa-download"></i> 打印
            </a>
<!--            <div></div>-->
        </div>
    </div>
</div>
<div th:include="include :: footer"></div>
<script th:inline="javascript">
    var editFlag = [[${@permission.hasPermi('system:ncZhenliaoLogs:edit')}]];
    var removeFlag = [[${@permission.hasPermi('system:ncZhenliaoLogs:remove')}]];
    var prefix = ctx + "system/ncZhenliaoLogs/cow";




    //新增诊疗单
    function addZhenLiaoLogs(name, url) {
        $.modal.openTab(name, url);
    }


    $(function () {
        var optionsStatus1 = {
            id: "bootstrap-table-mianyi-logs-status1",
            url: prefix + "/listConfirm/1/4",
            createUrl: prefix + "/add",
            updateUrl: prefix + "/edit/{id}",
            removeUrl: prefix + "/remove",
            exportUrl: prefix + "/export",
            modalName: "诊疗单",
            showExport: false,
            striped: true,
            showSearch: false,
            showRefresh: true,
            showColumns: false,
            showToggle: false,
            toolbar: 'toolbar1',
            columns: [
                /*{
                checkbox: true
                },*/
                {
                    title: '序号',
                    formatter: function (value, row, index) {
                        return $.table.serialNumber(index);
                    }
                },
                /*{
                    field : 'zlId',
                    title : '诊疗id',
                    visible: false
                },
                  {
                     field : 'zlType',
                     title : '诊疗类型 1:牛舍 2：鸡舍',
                     sortable: true
                 },
                 {
                     field : 'zlStatus',
                     title : '诊疗状态 1：待确认 2：已确认',
                     sortable: true
                 },
                 {
                    field : 'orderId',
                    title : '订单id',
                    sortable: true
                },
                {
                    field : 'cowId',
                    title : '牛id',
                    sortable: true
                },*/
                {
                    field: 'cowCode',
                    title: '耳号',
                    sortable: true
                },
                {
                    field: 'roomNum',
                    title: '圈舍号',
                    sortable: true
                },


                {
                    field: 'ageDays',
                    title: '日龄',
                    sortable: true
                },
                {
                    field: 'illMuns',
                    title: ' 发病次数',
                    sortable: true
                },
                {
                    field: 'symptom',
                    title: '症状',
                    sortable: true
                },
                /*{
                    field: 'reportUser',
                    title: '推送人',
                    sortable: true
                },*/
                {
                    field: 'zlUserName',
                    title: '诊疗人员'
                },

                {
                    field: 'drugName',
                    title: '药品名称',
                    sortable: true
                },
                {
                    field: 'zlResult',
                    title: '诊疗结果',
                    sortable: true
                },
                {
                    field: 'zlTime',
                    title: '诊疗时间',
                    sortable: true
                },
                /*  {
                      field: 'createBy',
                      title: '创建者',
                      sortable: true
                  },
                  {
                      field: 'createTime',
                      title: '创建时间',
                      sortable: true
                  },*/
                {
                    field: 'remark',
                    title: '备注',
                    formatter: function (value, row, index) {
                        return $.table.tooltip(value);
                    }
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function (value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.zlId + '\')"><i class="fa fa-edit"></i>修改</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.zlId + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
        };

        var optionsStatus2 = {
            id: "bootstrap-table-mianyi-logs-status2",
            url: prefix + "/list/1/2",
            createUrl: prefix + "/add",
            updateUrl: prefix + "/edit/{id}",
            removeUrl: prefix + "/remove",
            exportUrl: prefix + "/export",
            modalName: "诊疗单",
            showExport: true,
            striped: true,
            showSearch: false,
            showRefresh: false,
            showColumns: false,
            showToggle: false,
            toolbar: 'toolbar1',
            columns: [{
                checkbox: true
            }, {
                title: '序号',
                formatter: function (value, row, index) {
                    return $.table.serialNumber(index);
                }
            },
                {
                    field: 'zlId',
                    title: '序号',
                    visible: false
                },
                {
                    field: 'cowCode',
                    title: '耳号',
                    sortable: true
                },
                {
                    field: 'roomNum',
                    title: '圈舍号',
                    sortable: true
                },
                {
                    field: 'ageDays',
                    title: '日龄',
                    sortable: true
                },
                {
                    field: 'illMuns',
                    title: '发病次数',
                    sortable: true
                },
                {
                    field: 'symptom',
                    title: '症状',
                    sortable: true
                },
                {
                    field: 'reportUser',
                    title: '推送人',
                    sortable: true
                },
                {
                    field: 'remark',
                    title: ' 备注',
                    sortable: true,
                    formatter: function (value, row, index) {
                        return $.table.tooltip(value);
                    }
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function (value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.zlId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.zlId + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
        };

        $.table.init(optionsStatus1);


    });


</script>
</body>
</html>